package com.stone.design.mode.command;

/**
 * 真实命令B
 *
 * @author Mr_wenpan@163.com 2022/01/16 14:07
 */
public class ConcreteCommandB extends Command {

    public ConcreteCommandB() {
        // 如果不指定命令接受者，那么使用默认的命令接受者
        super(new ConcreteCommandReceiverB());
    }

    /**
     * 可自定义命令接受者
     */
    public ConcreteCommandB(CommandReceiver commandReceiver) {
        super(commandReceiver);
    }


    @Override
    public void execute() {
        commandReceiver.doSomething();
    }

}
